// 获取用户数据接口
import request from '@/utils/request'
// 获取所有评论
export const comments = (params) => {
  return request({
    method: 'GET',
    url: '/v1_0/comments',
    params
  })
}
// 对评论或评论回复点赞
export const addCommontLike = (target) => {
  return request({
    method: 'POST',
    url: '/v1_0/comment/likings',
    data: {
      target
    }
  })
}
// 取消评论点赞
export const deleteCommontLike = (target) => {
  return request({
    method: 'DELETE',
    url: `/v1_0/comment/likings/${target}`
  })
}
// 评论文章
export const addPost = (data) => {
  return request({
    method: 'POST',
    url: '/v1_0/comments',
    data
  })
}
